There is no syntax ...

Eat Your Greens

EYG

Why

Introduction

This language is an experiment in making a highly portable functional language. The syntax shown below only illustrates the features of the language, it is only one of many possible projections to view a program. Creating programs is not done by editing text files instead a structured editor is needed.

The language has both a compiler and interpreter, either or even both can be used in one program. Anonymous functions can be captured, serialised and sent to other computers. For example a client and server app can be written as one function.

:

A fully exhaustive type checker exists for the language. i.e. if the checks pass it is guaranteed not to crash. This can be optionally run, it's not worth type checking a build script you get the same error anyway. It's possible to type check a single function.

Because the type system is complete and structural no type ever needs to be declared up front and no annotation is required, in fact annotation is not supported in the language. This choice is to make programmers never need to think about types. Type annotations are possible in the editor but they are only a debug tool and not committed to the source.

The type system contains extensible records and unions as well as an algebraic effect system. These three components are all built on row types, using the same approach for each keeps the implementation simple.

All of the goals of the language are achieved by having the Abstract Syntax Tree (AST) of the language be the public interface and keeping that interface as small as possible. There are currently only 19 different node types that make up the AST.

Examples

applet

fetch

: